kmpkg_from_gitee(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO kumo-hub/double-conversion
    REF "v${VERSION}"
    SHA512 4fa323391ad8c18ba6ec33bc3063a666732a94d8472bc2f12a57af8b36b74ebf22714ada20f22dd2e86f3f64712149deb2b995260bef08bf534745c9b8ca7028
    HEAD_REF master
)

kmpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
)

kmpkg_cmake_install()

# Rename exported target files into something kmpkg_cmake_config_fixup expects
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}")
    kmpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
endif()

kmpkg_copy_pdbs()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

# Handle copyright
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
